package com.thesis.utils;

import java.util.LinkedList;


public class BusRoute {

    public short BusRouteID;
    public boolean luotdi = true;
    public LinkedList<Character> BusStopIDList = new LinkedList<Character>();
    
    public String toString()
    {
    	String temp = "BusRouteNo " + this.BusRouteID +":";
    	for (int i = 0; i < BusStopIDList.size(); i++) {
			temp += " " + (int)BusStopIDList.get(i);
		}
    	return temp;
    }
    
    public Character getNext(int bustopID)
    {
    	for (int i = 0; i < BusStopIDList.size(); i++) {
			if ((int)BusStopIDList.get(i)== bustopID)
				if ((i+1)<BusStopIDList.size())
					return BusStopIDList.get(i+1);
		}
    	return 0;
    }
}
